import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};

//平台概览|看板-设备统计
export const deviceStat = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/common/deviceStat`, {
    data
  });
};
//平台概览|其他科室指标
export const dashboardqueryOtherDeptIndicator = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/dashboard/queryOtherDeptIndicator`, {
    data
  });
};

//平台概览|看板-交接班任务
export const handoverTask = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/common/handoverTask`, {
    data
  });
};

//日消耗
export const queryConsumeChartForDay = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/dashboard/queryConsumeChartForDay`, {
    data
  });
};

//水量日消耗
export const queryConsumeChartForFutureDay = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/dashboard/queryConsumeChartForFutureDay`, {
    data
  });
};

//小时消耗
export const queryChartForHour = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/dashboard/queryChartForHour`, {
    data
  });
};

//回收率指标
export const queryRecycleRateIndicator = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/dashboard/queryRecycleRateIndicator`, {
    data
  });
};

//SPC指标超出
export const querySpcIndicatorOut = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/dashboard/querySpcIndicatorOut`, {
    data
  });
};

//水科交接班
export const dashboardtodoList = (data?: object) => {
  return http.request<ResultTable>("post", `/operation/api/v1/water/dashboard/todoList`, {
    data
  });
};
